#include "Packet.h"
#include "Debug.h"

CPacket::CPacket(void) : m_bsPacketContent(NULL)
{
}

CPacket::CPacket( IStream *bsPacketContent ) : m_bsPacketContent(bsPacketContent)
{
	TRACE(__FUNCTION__, __LINE__, " building a CPacket");
}

CPacket::~CPacket(void)
{
	m_bsPacketContent = NULL;
}

std::string CPacket::getBufferContent() const
{
	return m_bsPacketContent->getBufferContent();
}

void CPacket::addBack( const std::string& data )
{
	m_bsPacketContent->addBack(data);
}

void CPacket::addFront( const std::string& data )
{
	m_bsPacketContent->addFront(data);
}

void CPacket::addAt( const std::string& data, int offset )
{
	m_bsPacketContent->addAt(data, offset);
}

void CPacket::removeElements( int offset, int count )
{
	m_bsPacketContent->removeElements(offset, count);
}

BOOST_CLASS_EXPORT(CPacket)


